﻿@model MasResourceSubGroup

@{
    int resGrpId = ViewBag.ResGrpId;
    var resGrp = new KPIS.GERP.WEB.GIMS.MasResourceService.MasResourceServiceClient().SelectResourceGroup(new MasResourceGroup{ResGrpId = resGrpId},null).FirstOrDefault();
    var resType = new KPIS.GERP.WEB.GIMS.MasResourceService.MasResourceServiceClient().SelectResourceType(new MasResourceType{ResTypeId = resGrp.ResTypeId.Value}, null).FirstOrDefault();
    ViewBag.CustomMenu = new Dictionary<string, string>
        {
            {
                "ประเภท" + resType.Name, Url.Action("Index", "MasResourceType")
            }, 
            {
                "หมวด" + resGrp.Name, Url.Action("Index", "MasResourceGroup", new {resTypeId=resGrp.ResTypeId})
            }, 
            {
                "กลุ่ม", Url.Action("Index", "MasResourceSubGroup", new {resGrpId = resGrp.ResGrpId})
            }
        };
	ViewBag.Title = "ข้อมูลกลุ่มพัสดุ"; 
    ViewBag.Descr = "รายละเอิยดกลุ่มพัสดุ" + (Model.Name ?? string.Empty);
}

<div class="block-button-menu-above">
    @Html.ButtonViewAll(new{ViewBag.ResGrpId})
    @Html.ButtonEdit(new { id = Model.ResSubGrpId,ViewBag.ResGrpId})
    @Html.ButtonAdd(new {ViewBag.ResSubGrpId})
    @Html.ButtonDelete(new { id = Model.ResSubGrpId,ViewBag.ResGrpId })
</div>
    
@Html.Partial("_DetailsForm")

@section scripts
{
    <script>
        
    </script>
}